#include "stdafx.h"
#include "NeededData.h"

void NeededData::SetData( int ID,CString strName,CString strBirthday, CString strIdentifyNumber, int LastNameLength, Pronunciation* pPronunciation )
{
	m_ID = ID;
	m_Name.SetString(strName);
	m_Birthday.SetString(strBirthday);
	m_IdentifyNumber.SetString(strIdentifyNumber);
	SetPronunciation(pPronunciation,LastNameLength);
}

void NeededData::SetPronunciation( Pronunciation* pPronunciation, int iLength )
{
	for ( int i=iLength ; i<m_Name.GetLength() ; i++ )
	{
		m_Pronunciation += pPronunciation->GetPronunciation((CString)m_Name.GetAt(i));
	}
}

void NeededData::SetAsInvalid()
{
	m_IsValid = false;
}

bool NeededData::GetValidation()
{
	return m_IsValid;
}

